package com.kyh.controller.api.sys;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.kyh.service.sys.RoleMenuService;
import com.kyh.vo.R;

@Controller
@RequestMapping("/api/inter/roleMenu")
public class ApiInterRoleMenuController {

	@Autowired
	private RoleMenuService roleMenuService;
	
	@PostMapping("/deleteTrueByUk")
    @ResponseBody
	public R deleteTrueByUk(Model model, HttpServletRequest request, HttpServletResponse response,
			Long roleId,
			Long menuId,
			Integer status
			){
		
		R retMsg;
		try {
			retMsg = roleMenuService.deleteTrueByUk(
					roleId,
					menuId
					);
		} catch (Exception e) {
			retMsg = R.error("服务器正在开小差，请联系客服");
		}
		
		return retMsg;
	}
}